package javashop;

import javax.jdo.PersistenceManager;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

public class ShopUserTestCase {
	public static void main(String[] args) {
		UserService userService = UserServiceFactory.getUserService();
		User user = userService.getCurrentUser();
		ShopUserBean shopUser = new ShopUserBean(user, user.getNickname(), user.getEmail());
		PersistenceManager pm = PMF.get().getPersistenceManager();
		try {
			ShopUserBean result = pm.makePersistent(shopUser);
			
		} finally {
			pm.close();
		}
		return;
	}
}
